package com.corpgovernment.organization.enumm;

import java.util.Arrays;

public enum LeaderEnum {

    T("T", "是"),

    F("F", "不是");

    private String code;
    private String desc;

    LeaderEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static LeaderEnum getByCode(String code) {
        return Arrays.stream(LeaderEnum.values()).filter(e -> code.equals(e.code)).findFirst().orElse(null);
    }
}
